#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include<assert.h>

char* my_strcat(char* dest, const char* src)
{
	assert(dest && src);
	char* ret = dest;
	while (*dest != '\0')
	{
		dest++;
	}

	while (*dest == *src)
	{
		dest++;
		src++;
	}

	return ret;

}

int main()
{
	char arr1[20] = "abc";
	char arr2[] = "def";

	printf("%s", strcat(arr1, arr2));
	printf("\n");
	printf("%s", my_strcat(arr1, arr2));

	return 0;
}